package com.xds.gulimall.product.vo.html;

import com.xds.gulimall.product.entity.SkuImagesEntity;
import com.xds.gulimall.product.entity.SkuInfoEntity;
import com.xds.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

/**
 * @author : baixu
 * @date : 11:15 2021/12/17
 */
@Data
public class SkuItemVo {
    SkuInfoEntity skuInfo;//sku基本信息
    List<SkuImagesEntity> images;//sku的图片信息
    SpuInfoDescEntity spuInfoDesc;//spu描述介绍信息
    List<SkuItemSaleAttrVo> saleAttr;//销售属性组合
    List<SpuItemAttrGroupVo> groupAttrs;//spu规格参数
    private boolean hasStock=true;//是否有货
    @Data
    public static  class SkuItemSaleAttrVo{
        private Long attrId;//属性id
        private String attrName;//属性名
        private List<AttrValueWithSkuIdVo> attrValues;//属性值
    }
    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;//分组名字
        private List<SpuBaseAttrVo> attrs;
    }
    @Data
    public static class SpuBaseAttrVo{
        private String attrName;//属性名
        private String attrValue;//属性值

    }
    @Data
    public static class AttrValueWithSkuIdVo{
        private String attrValue;
        private String skuIds;

    }

}
